<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
	<meta name="format-detection" content="telephone=no">
	<title>layer-更懂你的web弹窗解决方案</title>
	<script src="http://cdn.bootcss.com/jquery/1.12.3/jquery.min.js"></script>
	<script src="layer.js"></script>
<style>
.demo-content{padding: 20px;}
</style>
</head>
<body>

<script type="text/javascript">
var content = '<div style="width:320px;height:100px;"><img src="test_img.png"></div>';
//页面层
layer.open({
	type: 1,
	title: false,
	closeBtn: 0,
	skin: 'layui-layer-nobg',
	area: ['300px'],
	content: content,
	success: function(layero, index) {
		layer.iframeAuto(index);
	}
});

// layer.open({
// 	type: 1,
// 	title: '这个是标题',
// 	content: '<div class="demo-content">123<img src="test_img.png">456</div>',
// 	//area: 'auto',
// 	//area: [_this.naturalWidth+'px',_this.naturalHeight+'px'],
// 	//offset: 'auto',
// 	success: function (layero, index) {
// 		//layer.iframeAuto(index)
// 	},
// 	cancel: function(index, layero){
// 		layer.alert('有表情地提示', {icon: 2, skin: 'layer-ext-sweet'});
// 	}
// });
</script>
</body>
</html>